/*
 * @Author: your name
 * @Date: 2020-08-23 18:42:09
 * @LastEditTime: 2020-08-27 11:28:52
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \ryfront\src\api\res.js
 */
//发送请求调用后端

import axios from './http.js';

//获取根节点
export const resRoot = ()=> {
    return axios.get("/d_resource/d-resource/getResRoot");
} 

//获取下级节点，通过父节点ID  
export const resSubNode = (id) => {
    return axios.get("d_resource/d-resource/getSubNode?id="+id);
}

//添加资源
export const resAdd = (object) =>{
    return axios.post("d_resource/d-resource/addRes",object);
}
//通过ID查询资源详情
export const resById = (id) => {
    return axios.get("d_resource/d-resource/getResById",{params:{id:id}});
}

//修改资源详情 
export const resUpd = (obj) => {
    return axios.post("d_resource/d-resource/resUpd",obj);
}

//获取所有资源  但是不分页 
export const resListAll = () => {
    return axios.get("/d_resource/d-resource/getAllRes");
}